package red.stu.demo.pconstraint.demo;

import com.alibaba.fastjson.JSONObject;

/**
 * @author yihrmc @stu.red
 * @date 2019/11/22 14:44
 */
public class RunDemo {

    public static void main(String[] args) {

        MyProcessService myProcessService = new MyProcessService();
        MyProcessOtherService myProcessOtherService = new MyProcessOtherService();

        MyProcess myProcess = new MyProcess()
                .setCreaterUserId(1L);
        System.out.println("createInfo------------------------------------------------");

        myProcessService.createInfo(myProcess, "test");
        System.out.println("test: " + JSONObject.toJSONString(myProcess));

        System.out.println("p1------------------------------------------------");
        myProcessService.p1(myProcess);

        System.out.println("Z1------------------------------------------------");
        myProcessOtherService.b1_p1(myProcess);

        System.out.println("Z2------------------------------------------------");
        myProcessOtherService.b1_p2(myProcess);

        System.out.println("p2------------------------------------------------");
        myProcessService.p2(myProcess);

        System.out.println("p3------------------------------------------------");
        myProcessService.p3(myProcess);

        System.out.println("close------------------------------------------------");
//        myProcess.setProcessInstanceId(null);
//        myProcessService.p3(myProcess);


    }

}
